﻿//===================================================================
// 西交通开发框架-XCI.Parent 2019 版权所有     
//===================================================================
using System;
using System.ComponentModel.DataAnnotations;
using XCI.Data.Entity;

namespace XCI.Sys.Model
{
    /// <summary>
    /// 系统参数
    /// </summary>
    [Table("系统参数")]
    public class SysParam
    {
        /// <summary>
        /// 参数主键
        /// </summary>
        [Primary]
        [Column("参数主键", false)]
        public string Id { get; set; }

        /// <summary>
        /// 参数名称
        /// </summary>
        [Column("参数名称")]
        [Required(ErrorMessage = "请输入参数名称")]
        [StringLength(100, ErrorMessage = "参数名称不能超过100个字符")]
        public string Name { get; set; }

        /// <summary>
        /// 参数编码
        /// </summary>
        [Column("参数编码")]
        [Required(ErrorMessage = "请输入参数编码")]
        [StringLength(100, ErrorMessage = "参数编码不能超过100个字符")]
        public string Code { get; set; }

        /// <summary>
        /// 参数值
        /// </summary>
        [Column("参数值")]
        [Required(ErrorMessage = "请输入参数值")]
        [StringLength(2000, ErrorMessage = "参数值不能超过2000个字符")]
        public string Value { get; set; }

        /// <summary>
        /// 参数名称简拼
        /// </summary>
        [Column("参数名称简拼", false)]
        [StringLength(100, ErrorMessage = "参数名称简拼不能超过100个字符")]
        public string Spell { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("备注")]
        [StringLength(500, ErrorMessage = "备注不能超过500个字符")]
        public string Remark { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SysParam Clone()
        {
            return (SysParam)MemberwiseClone();
        }
    }
}
